<?php

  if (count($url) > 2) {
    $db_limit['start'] = (int) end($url);
  } else {
    $db_limit['start'] = 0;
  }

  $db_limit['limit'] = (int) base::get('iAnzahl');
  $db_limit['next'] = ($db_limit['start'] + $db_limit['limit']);
  $db_limit['prev'] = ($db_limit['start'] - $db_limit['limit']);
  $ses->set('db_limit', $db_limit);

  template::setText('Blaetter', True);
  $list = $ticket->listTickets();

  for($l=0; $l<count($list); $l++) {
    $detail = $ticket->readTicket($list[$l]['id']);
    include('ticket_details.php');
    
    $tmp[$l] = $detail;
    unset($detail);
  }
  
  if(isset($tmp)) {
    template::setText('liste', $tmp);
  }
?>

